package com.example.wenzimanxian;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Strat7Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_strat7);
        Button gstrat=findViewById(R.id.G_strat);
        gstrat.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SharedPreferences sp=getSharedPreferences("youxi",MODE_PRIVATE);
                String b=sp.getString("name","");
                if(b.equals("qq")){
                    Intent intent=new Intent(Strat7Activity.this,Strat8Activity.class);
                    startActivity(intent);
                }else if(b.equals("zz")){
                    Intent intent=new Intent(Strat7Activity.this,Strat12Activity.class);
                    startActivity(intent);
                }
            }
        });
    }
}
